<?php

namespace app\admin\validate;

use think\Validate;

class BaseValidate extends Validate
{
    protected $rule = [
        'id' => 'require|integer',
        'page' => 'require|integer',
        'pageSize' => 'require|integer',
    ];
    protected $message = [
        'id.require' => 'ID不能为空',
        'id.integer' => 'ID必须为整数',
        'page.require' => '页码不能为空',
        'page.integer' => '页码必须为整数',
        'pageSize.require' => '每页显示条数不能为空',
        'pageSize.integer' => '每页显示条数必须为整数',
    ];
    protected $scene = [
        'retrieve' => ['page', 'pageSize'],
        'delete' => ['id'],
    ];
}